<template>
	<div class="reactive">
		<h3>4.reactive 函数</h3>
		<p>obj.message的值是 {{obj.message}}</p>
		<button v-on:click="changeMsg()">chaneg message</button>
		<button v-on:click="getMsg()">get message</button>
	</div>
</template>


<script setup>
	import { reactive } from 'vue';
	let obj = reactive({
		message:'不畏浮云遮望眼自缘身在最高层',
		age:12
	})
	const changeMsg = () => {
		obj.message = '欲穷千里目更上一层楼'
	}
	const getMsg = () => {
		alert(obj.message)
	}
</script>



<style scoped>
.reactive{
 	font-size: 16px;
 	font-weight: bold;
 	width: 200px;
 	height: 200px;
 	border: 1px solid blue;
 }
</style>
